<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>Tesseract.js Offline</title>
    <script src="../js/tesseract.min.js"></script>
    <script>
        const { createWorker } = Tesseract;
        const worker = createWorker({
            workerPath: '../js/worker.min.js',
            langPath: '../lang-data',
            corePath: '../js/tesseract-core.wasm.js',
            logger: m => console.log(m),
        });

        (async () => {
            await worker.load();
            await worker.loadLanguage('chisim');
            await worker.initialize('chisim');
            const { data: { text } } = await worker.recognize('../images/test.jpg');
            console.log(text);
            await worker.terminate();
        })();
    </script>
</head>

<body>
</body>

</html>